<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/30 0030
 * Time: 15:18
 */

//class test{
//    public static function a()
//    {
//        echo 111;
//    }
//}
//$obj = new test();
//
//$obj->a();
//test::a();
$str = '106.14.120.16:9503_1000';

$res = preg_match('/^(?P<url>((\d?\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d?\d|1\d\d|2[0-4]\d|25[0-5]){1,3}):(?P<port>[\d]{4})_(?P<uid>[\d]+)/',$str,$matches);
var_dump($res);
var_dump($matches);